<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        var year = 2021;
        if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
            document.write(year + '是闰年')
        }else {
            document.write(year + '不是闰年')
        }
    </script>
</body>
</html>